package Thread;

import com.sun.scenario.effect.impl.prism.PrImage;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName interview
 * @Description: TODO
 * @date ${DAT}22:33
 */
public class Test{
    public static void main(String[] args) {
        A a = new B();
        System.out.println(a.getS1());
        System.out.println(a.getS2());
        System.out.println(a.s2);
    }
}
class A{
    private String s1 = "A1";
    public String s2 = "A2";

    public String getS1() {
        return s1;
    }

    public String getS2() {
        return s2;
    }

    public A() {
        System.out.println("A");
    }
}

class B extends A{
    private String s1 = "B1";
    public String s2 = "B2";

    public String getS1() {
        return s1;
    }

    public String getS2() {
        return s2;
    }
}